Robotics 1.0 Lesson Plan
Lesson 21: Is Sky the limit?

Purpose: Implement a safe vertical sliding mechanism using a rack and pinion, a telescopic slide and limit switches.

No. of. Classes

1 - (Time : 1:30 minutes, Each group maximum 4 children).

Materials Required

Desktop or Laptop computer,CPX Board,USB Cable, Crickit, 5v battery

MG995 servo motor

Telescopic slide (drawer slide/linear rail)

Jumper wires

2 Limit switches (for left & right ends)

Prior knowledge

  • Connect and control a servo motor using the CPX and Crickit
  • Understand basic rack and pinion movement
  • Know how digital inputs like limit switches work
  • Be able to upload and run CircuitPython code using the Mu Editor.
  • Exercises

    Exercise:1



  • Add the limit switches to the bottom of the rack and top of the rack. The limit switch has to be attached firmly so that it doesnt move away or fall off. Follow the demo in this video for the assembly


  • Recall the testing code for the limit switches from the previous lesson. Use that code to test the connections and working of the limit switches



  • Exercise:2



  • Implement this pseudocode to simulate the vertical lift with limits



  • Solution



  • Click here to see the solution video for Exercise 2

  • Click here to view the code for Exercise 2

  • Click here to view the code explanation for Exercise 2

  • Teacher's Instruction
    1. Explain the objective of building a safe vertical lifting system using a rack and pinion and limit switches.
    2. Introduce the required parts such as the MG995 servo motor, telescopic slide, rack and pinion, and limit switches.
    3. Explain how limit switches work and how they act as safety stops at the top and bottom of the lift.
    4. Demonstrate how to mount and wire the limit switches so they are triggered when the lift reaches its end positions.
    5. Review the testing code used to read limit switch states and show how to confirm they are working correctly.
    6. Explain the pseudocode logic for moving up, stopping, and reversing when a limit is reached.
    7. Discuss why safety checks using limit switches are important in real machines like elevators and lifts.
    8. Observe that the pinion will slide down the rack on its own even without throttle once it hits the limit switch at the top. How do we make it stationary at the top?
    9. In real elevators, what other sensors or safety systems might be added besides limit switches and why? Discuss
    10. What will happen if in the middle of the vertical lift, the battery runs out of power? Discuss